import request from '@/config/axios'
import type { taskSearch } from './type'

export const taskList = (data: any) => {
  console.log(data)
  return request.post({
    url: `/app/taskList`,
    data
  })
}

export const taskListNew = (data: any) => {
  return request.post({
    url: `/app/taskListNew`,
    data
  })
}

export const getAddressJd = (id: string) => {
  return request.get({
    url: `/app/getAddressJd/${id}`
  })
}

export const saveTask = (data: any) => {
  return request.post({
    url: `/app/saveTask`,
    data
  })
}

export const getTask = (data: any) => {
  return request.post({
    url: `/app/getTask`,
    data
  })
}

export const getCardTab = () => {
  return request.get({
    url: `/app/getDictionary/cardTab`
  })
}

export const getcardTabETC = () => {
  return request.get({
    url: `/app/getDictionary/cardTabETC`
  })
}

export const addTaskMess = (data: any) => {
  return request.post({
    url: `/app/addTaskMess`,
    data
  })
}

export const getTaskMess = (data: any) => {
  return request.post({
    url: `/app/getTaskMess`,
    data
  })
}

export const getSN = (data: any) => {
  return request.post({
    url: `/app/addTaskSN?userId=${data.userId}`,
    data
  })
}
